<template>
  <div class="user">
    <div class="left">
      <div class="top">
        <el-icon><HomeFilled /></el-icon>
        <span>/ 医院信息</span>
      </div>
      <el-menu :default-active="$route.path" class="el-menu-vertical-demo">
        <el-menu-item index="/user/authentication" @click="goUser('/user/authentication')">
          <el-icon><icon-menu /></el-icon>
          <span>实名认证</span>
        </el-menu-item>
        <el-menu-item index="/user/orders" @click="goUser('/user/orders')">
          <el-icon><document /></el-icon>
          <span>挂号订单</span>
        </el-menu-item>
        <el-menu-item index="/user/manage" @click="goUser('/user/manage')">
          <el-icon><User /></el-icon>
          <span>就诊人管理</span>
        </el-menu-item>
        <el-menu-item index="/user/Account" @click="goUser('/user/Account')">
          <el-icon><setting /></el-icon>
          <span>账户管理</span>
        </el-menu-item>
        <el-menu-item index="/user/Feedback" @click="goUser('/user/Feedback')">
          <el-icon><Edit /></el-icon>
          <span>意见反馈</span>
        </el-menu-item>
      </el-menu>
    </div>
    <div class="right">
      <!-- 用户信息 -->
      <div class="comtend">
        <router-view></router-view>
      </div>
    </div>
  </div>

</template>

<script setup lang="ts">
//引入图标组件
import {
  Document,
  Menu as IconMenu,
  Edit,
  Setting,
  User,
  HomeFilled
} from "@element-plus/icons-vue";

//引入
import { useRouter, useRoute } from "vue-router";
let $router = useRouter();
let $route = useRoute();
//路由跳转
let goUser = (path: string) => {
    $router.push({
        path,
    })
    
    
}

</script>

<style scoped lang="scss">
.user {
    color:#7f7f7f;
  display: flex;
  .top {
    margin: 10px 0;
  }
  .left {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .right {
    flex: 8;
  }
}
</style>
